<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>login</title>
    <!-- Latest compiled and minified CSS -->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <style>
        body, html {
            background:rgba(255,255,255,1);
            font-size: 10.66px;
            padding:0;
            margin:0;
        }
        .zaly_container {
            display: flex;
            height: 100%;
            align-items: center;
            justify-content: center;
        }
        .zaly_jump {
            width:100%;
            text-align: center;
        }
        .zaly_header_tip {
            font-size:1.31rem;
            font-family:PingFangSC-Regular;
            font-weight:400;
            color:rgba(132,132,132,1);
            line-height:2.44rem;
            text-align: center;
        }
        .margin-top3{
            margin-top: 3rem;
        }
        .zaly_header_tip span {
            color:#4C3BB1;
        }
        .zaly_site_tip {
            width:14.35rem;
            height:5.82rem;
            background:rgba(245,245,255,1);
            border-radius:0.56rem;
            border:0.09rem solid rgba(201,201,201,1);
            text-align: center;
            line-height: height:5.82rem;
            padding-top: 1rem;
        }
        .zaly_site_tip_div{
            width: 35.18rem;
            text-align: center;
            justify-content: center;
            display: flex;
            margin-top: 2rem;
            font-size:1.69rem;
            font-family:PingFangSC-Medium;
            font-weight:500;
            color:rgba(38,38,38,1);
        }
        .zaly_site_tip span {
            font-size:1.31rem;
            font-family:PingFangSC-Regular;
            font-weight:400;
            color:rgba(202,202,202,1);
        }
        .zaly_jump_browser {
            position: relative;
            text-align: left;
        }
        .download_app {
            margin-top: 14rem;
            width:14.07rem;
            height:3.75rem;
            background-color: white;
            border-radius:0.56rem;
            border:0.1rem solid rgba(76,59,177,1);
            font-size:1.31rem;
            font-family:PingFangSC-Regular;
            font-weight:400;
            color:rgba(76,59,177,1);
            margin-left:3rem;
            outline: none;
            cursor: pointer;
            margin-right: 1rem;
        }

        .open_app {
            width:14.07rem;
            height:3.75rem;
            background:rgba(76,59,177,1);
            border-radius:0.56rem;
            font-size:1.31rem;
            font-family:PingFangSC-Regular;
            font-weight:400;
            color:rgba(255,255,255,1);
            outline: none;
            cursor: pointer;
            border:0.09rem solid rgba(76,59,177,1);
        }
        </style>
</head>
<body>
<div class="zaly_container">
    <div class="zaly_jump zaly_jump_wx" style="position: relative;">
        <div class="zaly_header_tip margin-top3" style="margin-left: 3rem;">
            请点击右上角<img src="../../public/img/wx_pointer.png" style="width: 3rem;height:1rem;"><img src="../../public/img/arrow.png" style="width:5rem;height:4rem;position: absolute;right:3rem;top:0rem;"/>
        </div>
        <div class="zaly_header_tip" >
            在弹出的菜单中，选择“<span>Safari中打开</span>”
        </div>
        <div class="zaly_site_tip_div">
            <div class="zaly_site_tip">
                你即将访问<br/><span><?php echo $siteName;?></span>
            </div>

        </div>
        <div class="zaly_site_tip_div">
            <img  style="width: 23rem;height:39rem;" src=''>
        </div>
    </div>
    <div class="zaly_jump zaly_jump_browser" style="">
        <img style="width:100%; height:31rem;" src="../../public/img/app_download_bg.png">
        <img src="../../public/img/app_download.png" style="width:14rem; height:29rem;position: absolute; top:9rem;left:0;right:0;margin: 0 auto;">
        <button class="download_app">下载</button>
        <button class="open_app">打开</button>

        <input type="hidden" value="<?php echo $jumpUrl?>" class="jumpUrl">
    </div>

</div>

<script src="../../public/js/jquery.min.js"></script>
<script>
    function isWeixinBrowser(){
        return /micromessenger/.test(navigator.userAgent.toLowerCase())
    }
    if(isWeixinBrowser()) {
        $(".zaly_jump_wx")[0].style.display = "block";
        $(".zaly_jump_browser")[0].style.display = "none";
    } else {
        $(".zaly_jump_wx")[0].style.display = "none";
        $(".zaly_jump_browser")[0].style.display = "block";
    }

    function isPc(){ //detection PC and Mobile
        if(!(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) && !isWeixinBrowser()) {
            var jumpUrl = $(".jumpUrl").val();
            if(jumpUrl) {
                window.location.href = jumpUrl;
            }
        }
    }

    isPc();

    function getOsType() {
        var clientType;
        var u = navigator.userAgent;
        if (u.indexOf('Android') > -1) {
            clientType =  'Android';
        } else if (u.indexOf('iPhone') > -1) {
            clientType = 'IOS';
        } else {
            clientType = "PC";
        }
        return clientType;
    }

    $(document).on("click", ".download_app" , function () {
        var clientType = getOsType();
        if(clientType == "IOS") {
            window.location.href = "https://itunes.apple.com/cn/app/duckchat/id1434153512?l=en&mt=8";
            return ;
        }
        window.location.href = "http://duckchat.akaxin.com";
    });

    $(document).on("click", ".open_app" , function () {
        var jumpUrl = $(".jumpUrl").val();
        jumpUrl = jumpUrl.replace("http://", "duckchat://");
        window.location.href = jumpUrl;
    });

</script>
</body>
</html>
